// pages/teacherstudent/teacherstudent.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    student: "",
    id:""
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({
     id: options.id
    })
    this.getData(options.id)
  },

  getData(id) {
    let that = this
    wx.request({
      url: 'http://localhost:8080/Examination_System_war/wxteacher/getPointByTeachId',
      data: {
        id
      },
      header: { 'content-type': 'application/x-www-form-urlencoded' },
      method: 'POST',
      dataType: 'json',
      responseType: 'text',
      success: (result) => {
        that.setData({
          student: result.data
        })
      },
      fail: () => { },
      complete: () => { }
    });

  },
  goPage(e) {
    let id = e.currentTarget.dataset.operation.userid;
    wx.navigateTo({
      url: '/pages/liucheng/index?id='+id+"&teacher="+this.data.id,
    });
      
  }

})